//
//  MVCollectionViewCell.m
//  22-homework-QQMV-ALi
//
//  Created by 王道林 on 16/8/13.
//  Copyright © 2016年 王道林. All rights reserved.
//

#import "MVCollectionViewCell.h"
#import "MVListModel.h"
#import "UIImageView+WebCache.h"
@implementation MVCollectionViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.contentView.backgroundColor = [UIColor whiteColor];
}


- (void)setMVlist:(MVListModel *)MVlist
{
    _MVlist = MVlist;
    NSString *string = [NSString stringWithFormat:@"%@ - %@", _MVlist.mvtitle, _MVlist.singer_name];
    _LableSing.text = string;
    _LableDes.text = _MVlist.mvdesc;
    if (_MVlist.picurl.length != 0) {
        [_iamgeView sd_setImageWithURL:[NSURL URLWithString:_MVlist.picurl] placeholderImage:[UIImage imageNamed:@"1"]];
    }
    else{
        NSString *path = [NSString stringWithFormat: @"http://shp.qpic.cn/qqvideo_ori/0/%@_360_204/0?max_age=259200", _MVlist.vid];
        [_iamgeView sd_setImageWithURL:[NSURL URLWithString:path] placeholderImage:[UIImage imageNamed:@"1"]];
    }
}
@end
